package ro.isdc.navigator.misc.domain;

import java.util.Date;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

/**
 * Person class
 * 
 * @author Andrei Chirila
 */
public abstract class Person extends Entity {
  
  /**
   * Generated Serial Version UID
   */
  private static final long serialVersionUID = 4323584010366357936L;

  /**
   * First name
   */
  protected String firstName;
  
  /**
   * Last name
   */
  protected String lastName;
  
  /**
   * Sex
   */
  protected SexType sexType;
  
  /**
   * Date of birth
   */
  protected Date dateOfBirth;

  /**
   * Social Security Number
   */
  protected String SSN;
  
  /**
   * @return the firstName
   */
  public String getFirstName() {
    return firstName;
  }

  /**
   * @param firstName the firstName to set
   */
  public void setFirstName(final String firstName) {
    this.firstName = firstName;
  }

  /**
   * @return the lastName
   */
  public String getLastName() {
    return lastName;
  }

  /**
   * @param lastName the lastName to set
   */
  public void setLastName(final String lastName) {
    this.lastName = lastName;
  }

  /**
   * @return the sexType
   */
  public SexType getSexType() {
    return sexType;
  }

  /**
   * @param sexType the sexType to set
   */
  public void setSexType(final SexType sexType) {
    this.sexType = sexType;
  }

  /**
   * @return the dateOfBirth
   */
  public Date getDateOfBirth() {
    return dateOfBirth;
  }

  /**
   * @param dateOfBirth the dateOfBirth to set
   */
  public void setDateOfBirth(final Date dateOfBirth) {
    this.dateOfBirth = dateOfBirth;
  }
  
  /**
   * @return the sSN
   */
  public String getSSN() {
    return SSN;
  }

  /**
   * @param ssn the sSN to set
   */
  public void setSSN(final String ssn) {
    this.SSN = ssn;
  }

  /**
   * @see java.lang.Object#toString()
   */
  public String toString() {
    return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
        .appendSuper(super.toString()).append("dateOfBirth", this.dateOfBirth)
        .append("lastName", this.lastName).append("SSN", this.SSN).append(
            "sexType", this.sexType).append("firstName", this.firstName)
        .toString();
  }
}
